<%@page import="service.TgoodsService"%>
<%@page import="entities.TgoodsEntity"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>团购</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.qtip-1.0.0-rc3.js"></script>
<style type="text/css">
/*Demo Styles*/
.center {
	width: 1080px;
	margin: auto;
	height: auto;
	padding: 0px;
}

.block {
	float: left;
	position: relative;
	overflow: hidden;
	width: 300px;
	height: 350px;
	margin: 10px;
	border: 1px solid #696969;
	background: #F8F8FF;
	box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.5) !important;
	z-index: 20;
}

.look {
	display: block;
	width: 80px;
	height: 28px;
	float: right;
	margin-left: 100px;
	background: #690;
	text-align: center;
	font-size: 18px;
	font-weight: bold;
	color: white;
}

.com-place {
	POSITION: absolute;
	FILTER: Alpha(opacity = 0);
	PADDING-BOTTOM: 5px;
	LINE-HEIGHT: 24px;
	BACKGROUND-COLOR: black;
	OUTLINE-STYLE: none;
	PADDING-LEFT: 10px;
	WIDTH: 280px;
	BOTTOM: 138px;
	PADDING-RIGHT: 10px;
	COLOR: white;
	MAX-HEIGHT: 166px;
	FONT-SIZE: 14px;
	OVERFLOW: hidden;
	CURSOR: pointer;
	TEXT-DECORATION: none !important;
	PADDING-TOP: 5px;
	opacity: 0;
	-moz-transition: opacity .5s ease-out;
	-webkit-transition: opacity .5s ease-out;
	transition: opacity .5s ease-out
}

.com-place:active {
	
}

.place-hover {
	FILTER: Alpha(opacity = 90);
	opacity: .8
}

.place-hover:hover {
	FILTER: Alpha(opacity = 90);
	opacity: .9
}

.block:hover {
	box-shadow: none !important;
}

.comprice {
	margin-top: 10px;
	margin-left: 10px;
	color: black;
}

.price {
	font-size: 28px;
	color: #690;
}

.buy {
	margin-top: 30px;
	margin-left: 50px;
}

.floaltl {
	float: left;
}
</style>



</head>

<body>
	<jsp:include page="header.jsp"></jsp:include>
	<div style="height: 33px;"></div>
	<span
		style="display:block;text-align:center;line-height:25px;width=1080px;font-size:22px;font-weight:bold;color:green;">今日团购</span>
	<div class="center">
		<%
			List<TgoodsEntity> TgoodsList  =  TgoodsService.getTgoods();
				for(TgoodsEntity tgoods :TgoodsList){
		%>
		<div class="block">
			<a class="com-place" href="tgdetail.jsp?tgoodsId=<%=tgoods.getTgId()%>" target="_brank"><%=tgoods.getSellerName()%><br />地址：<%=tgoods.getSellerAddr()%><br />联系电话：<%=tgoods.getSellerTel()%>
			</a>
			<a href="tgdetail.jsp?tgoodsId=<%=tgoods.getTgId()%>"
				class="sellerInfo floatl" title="<%=tgoods.getTgName()%>"
				rel="sellerInfo.jsp?id=<%=tgoods.getTgSeId()%>"> <img
				width="100%" height="60%" src="<%=tgoods.getTgImage()%>" /> 
			</a>
			<span
				style="display:block;text-align:center;line-height:25px;width=300px;font-size:22px;font-weight:bold;color:black;">
				<%=tgoods.getTgName()%> 
			</span>
			<div>
				<div class="comprice">
					<strong>￥</strong><font class="price"><%=tgoods.getTgPrice()%></font>
					&nbsp;&nbsp;&nbsp;&nbsp; 市场价 ￥<%=tgoods.getTgOldPrice()%>
				</div>
				<a class="look" href="tgdetail.jsp?tgoodsId=<%=tgoods.getTgId()%>">去看看</a>
				<div class="buy"><%=tgoods.getTgSaCou()%>人团购
				</div>
			</div>
		</div>
		<%
			}
		%>
	</div>
	<jsp:include page="footer.jsp"></jsp:include>


	<SCRIPT type=text/javascript>
		$("div.block").hover(function() {
			$(this).find('.com-place').addClass("place-hover");
		}, function() {
			$(this).find('.com-place').removeClass("place-hover");
		});
	</SCRIPT>
</body>
</html>
